package io.github.yuazer.zpokespring.Commands;

import io.github.yuazer.zaxlib.Utils.YamlUtils;
import io.github.yuazer.zpokespring.Main;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;

public class cmds implements CommandExecutor {
    @Override
    public boolean onCommand(CommandSender sender, Command command, String s, String[] args) {
        if (command.getName().equalsIgnoreCase("zpokespring")) {
            if (args.length == 0 || args[0].equalsIgnoreCase("reload") && sender.hasPermission("zpokespring.admin")) {
                Main.getInstance().reloadConfig();
                sender.sendMessage(YamlUtils.getConfigMessage("Message.reload"));
            }
        }
        return false;
    }
}
